cmake_minimum_required(VERSION 3.20)

# 设置项目名称
project(VideoPlayer1)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 仅在生成可执行文件时，将其放到 /bin
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# 添加主可执行文件
add_executable(main src/main.cpp)
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

# 添加测试可执行文件
add_executable(main_tests test/test.cpp)
set_target_properties(main_tests
    PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
    OUTPUT_NAME main_tests
)
target_include_directories(main_tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
